
<template lang="pug">
  kalix-dialog.user-add(bizKey="duty" ref="kalixBizDialog" v-bind:formModel.sync="formModel" v-bind:targetURL="targetURL")
    div.el-form(slot="dialogFormSlot")
      el-form-item(label="代码" prop="code" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.code" disabled)
      el-form-item(label="院系名称" prop="name" v-bind:rules="rules.name" v-bind:label-width="labelWidth")
        el-input(v-model="formModel.name")
</template>

<script type="text/ecmascript-6">
  import FormModel from './model'
  import {SchoolURL} from '../../config.toml'

  export default {
    name: 'SchoolEdit',
    data() {
      return {
        orgName: '',
        formModel: Object.assign({}, FormModel),
        rules: {
          name: [{required: true, message: '请输入院系名称', trigger: 'blur'}]
        },
        targetURL: SchoolURL,
        labelWidth: '120px'
      }
    },
    methods: {
      init(dialogOption, row) {
      }
    }
  }
</script>
